package org.imaginedays.androidall.ui;

import org.imaginedays.androidall.R;
import org.imaginedays.androidall.app.AndroidAllApp;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.View;

public class StartActivity extends Activity {

	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_start);
		
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.activity_start, menu);
		return true;
	}
	
	public static final int OPEN_OTHER = 0;

	public void OnClick(View v) {
		final Intent intent = new Intent(this, OtherActivity.class);
		startActivityForResult(intent, OPEN_OTHER);
//		startActivity(intent);

		// setContentView(R.layout.activity_jump);
		// Log.e(AndroidAllApp.TAG, "oh click me!");
	}

	
	@Override
	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
		
		switch (requestCode) {
		case OPEN_OTHER:
			if (data!=null) {
				String resultData = data.getStringExtra("data");
				Log.i(AndroidAllApp.TAG, "result: "+resultData);
			}
			break;

		default:
			break;
		}
		
	}

}
